package com.example.tests;

import java.io.File;
import java.io.FileReader;
import java.util.Properties;

import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;

import com.example.fw.AppManager;

public class TestBase {

    static AppManager app;

    @BeforeSuite
    public void setUp() throws Exception {
        // загрузим настройки и приложение
        Properties properties = new Properties();
        String configFile = System.getProperty("configFile", "application.properties");
        properties.load(new FileReader(new File(configFile)));
        app  = new AppManager(properties);
    }

    @AfterSuite
    public void tearDown() throws Exception {
        app.stopApp();
    }
}
